package com.meituan.sdk.model.ddzhkh.dingdan.orderReceiptPaymentshares;

import com.meituan.sdk.annotations.ApiMeta;
import com.google.gson.reflect.TypeToken;
import javax.validation.constraints.NotBlank;
import java.lang.reflect.Type;
import com.meituan.sdk.internal.utils.JsonUtil;
import com.google.gson.annotations.SerializedName;
import javax.validation.constraints.NotNull;
import com.meituan.sdk.MeituanResponse;
import com.meituan.sdk.MeituanRequest;

/**
* 订单券码分摊金额查询
* This file was automatically generated.
*/
@ApiMeta(
    path = "/ddzhkh/dingdan/receipt/paymentshares",
    businessId = 59,
    apiVersion = "10009",
    apiName = "order_receipt_paymentshares",
    needAuth = true
)
public class OrderReceiptPaymentsharesRequest implements MeituanRequest<OrderReceiptPaymentsharesResponse> {
    /**
    * <p data-diff-id="ct-diff-id-5aa5d839-3dd6-411f-9f02-814951507f8c"><span style="color: rgb(31, 45, 61)">订单id，24位数字</span></p>
    */
    @NotBlank(message = "orderId不能为空")
    @SerializedName("orderId")
    private String orderId;
    /**
    * <p data-diff-id="ct-diff-id-d39f7eae-f6ab-46a0-b210-e38a0c56b7ea"><span style="color: rgb(31, 45, 61)">订单类型，0-团购，1-次卡 &nbsp;&nbsp;</span></p>
    */
    @NotNull(message = "type不能为空")
    @SerializedName("type")
    private Integer type;

    public String getOrderId() {
        return orderId;
    }
    public void setOrderId(String orderId) {
        this.orderId = orderId;
    }
    public Integer getType() {
        return type;
    }
    public void setType(Integer type) {
        this.type = type;
    }


    @Override
    public MeituanResponse<OrderReceiptPaymentsharesResponse> deserializeResponse(String response) {
        Type type = new TypeToken<MeituanResponse<OrderReceiptPaymentsharesResponse>>(){}.getType();
        return JsonUtil.fromJson(response, type);
    }
    @Override
    public String serializeToJson() {
        return JsonUtil.toJson(this);
    }


    @Override
    public String toString() {
        return "OrderReceiptPaymentsharesRequest{" + "orderId=" + orderId + "," + "type=" + type + "}";
    }
}
